//
//  NSString+TYCPath.m
//  TYCWeiBo
//
//  Created by tangyunchuan on 2018/9/11.
//  Copyright © 2018年 中发. All rights reserved.
//

#import "NSString+TYCPath.h"

@implementation NSString (TYCPath)

- (NSString *)tyc_appendDocumentDir {
    NSString *dir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject;
    
    return [dir stringByAppendingPathComponent:self.lastPathComponent];
}

- (NSString *)tyc_appendCacheDir {
    NSString *dir = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject;
    
    return [dir stringByAppendingPathComponent:self.lastPathComponent];
}

- (NSString *)tyc_appendTempDir {
    NSString *dir = NSTemporaryDirectory();
    
    return [dir stringByAppendingPathComponent:self.lastPathComponent];
}
@end
